import request from '@/utils/request';
import { AxiosPromise } from 'axios';

/**
 * 查询简历模块列表
 * @param query
 * @returns {*}
 */
export const listModule = (query?: any) => {
  return request({
    url: '/business/resumeTemplate/list',
    method: 'get',
    params: query
  });
};

/**
 * 上传简历模块
 * @param query
 * @returns {*}
 */
export const addModule = (query?: any) => {
  return request({
    url: '/business/resumeTemplate',
    method: 'post',
    data: query
  });
};

/**
 * 删除简历模块
 * @param moduleId
 */
export const delModule = (moduleId: string | number | Array<string | number>) => {
  return request({
    url: '/business/resumeTemplate/' + moduleId,
    method: 'delete'
  });
};

/**
 * 修改简历模块
 * @param query
 * @returns {*}
 */
export const updateModule = (query?: any) => {
  return request({
    url: '/business/resumeTemplate',
    method: 'put',
    data: query
  });
};

/**
 * 获取简历模块详情
 * @param moduleId
 * @returns {*}
 */
export const getModule = (moduleId: string | number) => {
  return request({
    url: '/business/resumeTemplate/' + moduleId,
    method: 'get'
  });
};
